package mnEsq;

import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

import IU.Janela;
import java.awt.Font;

@SuppressWarnings("serial")
public class btOrcamento extends JPanel {

	private JPanel panel_1;
	private JLabel lblOramento;
	private JPanel pOramento;
	private JLabel lblNewLabel;

	/**
	 * Create the panel.
	 */
	public btOrcamento() {
		//this.setPreferredSize(new Dimension(180, 279));
		panel_1 = new JPanel();
		panel_1.setBounds(0, 0, 180, 36);
		panel_1.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {

				if (pOramento.isVisible() == true) {
					pOramento.setVisible(false);
					
					// panel_2.setLocation(panel_2.getX(),
					// panel_2.getY()-pOramento.getHeight());
				} else {
					pOramento.setVisible(true);
					// panel_2.setLocation(panel_2.getX(),
					// panel_2.getY()+pOramento.getHeight());
				}

			}
		});
		this.setLayout(null);
		panel_1.setBorder(null);
		this.add(panel_1);

		lblOramento = new JLabel("Or\u00E7amento");
		lblOramento.setFont(new Font("Tahoma", Font.PLAIN, 12));
		panel_1.add(lblOramento);

		pOramento = new JPanel();
		pOramento.setBounds(0, 37, 180, 243);
		this.add(pOramento);
		pOramento.setLayout(new GridLayout(9, 1, 0, 0));

		lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon(Janela.class
				.getResource("/Layout/menu_bt_teste.png")));
		pOramento.add(lblNewLabel);

	}

}
